docs(javascript): Prepare browser JavaScript docs for v11 - #19369
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
2db1678 to
e006730
Compare
e006730 to
c4f5b87
Compare
c4f5b87 to
34a087c
Compare
| Sentry's browser SDKs collect supported Web Vitals and associate them with your application's traces. The [Web Vitals dashboard](/product/dashboards/sentry-dashboards/frontend/web-vitals/) summarizes these metrics to show how each page performs for your users. | ||
|
|
||
| In JavaScript SDK version 11's default stream mode, LCP, CLS, and INP are sent as Web Vital spans. Earlier SDK versions and static mode can report vitals as measurements on pageload spans. In version 11, INP uses a Web Vital span in both modes. | ||
|
|
||
| To configure collection, see the [WebVitals integration](/platforms/javascript/configuration/integrations/webvitals/). If your custom dashboards or alerts use INP measurements, see the [v11 migration guide](/platforms/javascript/migration/v10-to-v11/). |
There was a problem hiding this comment.
Worth mentioning here that we collect web vitals for all kinds of navigations including page loads, soft navigations, and bfcache navigations.
I thought about adding this in several other areas but I think here makes the most sense to avoid being too yappy about it. It could be either it's own section or just a small mention, I'm not sure yet.
Okay, let's not do anything in this PR yet, I want to take a whole view on the web vitals documentation and see how we can describe all of this.
| Configure collection through `browserTracingIntegration({ webVitals: { ... } })`. The `enableInp` option is deprecated. Use `webVitals: { ignore: ["inp"] }` to disable INP, or include `"cls"` or `"lcp"` in `ignore` to skip those vitals. If you explicitly add `webVitalsIntegration()`, its options take precedence. | ||
|
|
||
| Soft-navigation vitals are enabled by default in stream mode on supporting browsers. Set `webVitals: { softNavigations: false }` to keep one set of vitals for the page lifetime. Back/forward-cache vitals are also enabled by default in stream mode when BrowserTracing's `instrumentBfcacheRestore` is enabled. Set `webVitals: { bfcacheNavigations: false }` to disable collection for restores. See <PlatformLink to="/configuration/integrations/webvitals/">WebVitals</PlatformLink> for requirements. |
There was a problem hiding this comment.
We should clean this up, feels like too many snippets crammed into this here and I think we can expand this to cover more.
I can take care of this after release, so let's not block the PR on this.
|
For the bfcache integration docs, I already have a PR for it, just need to update it. |
DESCRIBE YOUR PR
Update the JavaScript browser docs for SDK v11’s session defaults and tracing integrations. Document page-based sessions, the unhandled session status, and the FetchStreamPerformance, Interactions, UserTiming, and WebVitals integrations.
Align the migration guide, interactive migration snippets, Next.js tracing guide, and Web Vitals documentation with these behaviors.
Closes SDK-1478
Closes SDK-1479
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
Select exactly one option. For deadlines, replace
YYYY-MM-DDwith the due date. You can update this information later by editing the PR description.